<template>
  <el-container class="home_container">
    <el-header>
      <Header />
    </el-header>
    <el-container>
      <el-aside :width="isCollapse ? '64px' : '200px'">
        <Aside @changeIsCollapse="changeIsCollapse" :isCollapse="isCollapse" />
      </el-aside>
      <el-container>
        <el-main><Main /></el-main>
        <el-footer><Footer /></el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
import Header from "./common/Header.vue";
import Aside from "./common/Aside.vue";
import Main from "./common/Main.vue";
import Footer from "./common/Footer.vue";
export default {
  data() {
    return {
      isCollapse: false,
    };
  },
  components: {
    Header,
    Aside,
    Main,
    Footer,
  },
  methods: {
    changeIsCollapse() {
      this.isCollapse = !this.isCollapse;
    },
  },
};
</script>

<style scoped>
.el-footer {
  background-color: #e9eef3;
}
.el-header {
  background-color: #e0e0e0;
  padding-left: 0;
  align-items: center;
}

.el-aside {
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: aliceblue;
  text-align: center;
  line-height: 160px;
}

.home_container {
  padding-left: 0;
  height: 100%;
}
</style>
